import re
str1 = 'Port-channel1.189  192.168.189.254  YES CONFIG UP'
result = re.match('(^[A-Za-z]+.*\d)\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})+\s+\w*\s+\w*\s+(\w*)',str1.strip()).groups()

print('-'*100)
line1 = '接口      : {Interface}'.format(Interface = result[0])
line2 = 'IP地址    : {IPAddress}'.format(IPAddress = result[1])
line3 = '状态      : {Status}'.format(Status = result[2])
print(line1)
print(line2)
print(line3)



